package com.mdp.workflow.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mdp.core.entity.Result;
import com.mdp.workflow.biz.ru.entity.Execution;
import com.mdp.workflow.biz.ru.vo.ProcStartVo;

import java.util.List;
import java.util.Map;

/**
 * 流程相关操作
 ***/
public interface FlowExecutionService {

	/**
	 * 启动流程
	 * @param procStartVo
	 */
	public Result start(ProcStartVo procStartVo);

	public Result startPre(String procDefId);
	
	/** 请在此类添加自定义函数 */
	
	/**
	 * 激活流程
	 * @param processInstanceId
	 * @return
	 */
	Result activateProcessInstance(String processInstanceId);
	/**
	 * 挂起流程
	 * @param processInstanceId
	 * @return
	 */
	Result suspendProcessInstance(String processInstanceId);
	
	
	public List<Map<String,Object>> listProcinst(Map<String, Object> p); 
	
	public Map<String,Object> procInstVarsHandle( Map<String,Object> formData,Map<String,Object> flowVars);
	

	public Map<String,Object> localVarsHandle( Map<String,Object> formData,Map<String,Object> flowVars,Map<String,Object> localVars);


	Result delExecution(String processInstanceId, String commentMsg, Map<String, Object> localVars);

	List<Map<String, Object>> selectListMapByWhere(IPage page, QueryWrapper<Execution> qw, Map<String, Object> params);
}

